import cs543.library.rmi.RmiClientInterface;
import org.json.JSONArray;

public class RemoteAddition extends RmiClientInterface {
public RemoteAddition (String name) {
super (name);
}

public int sub (int b, int a) {
JSONArray args = new JSONArray ();
int ret = 0;
args.put (b);
args.put (a);
JSONArray rep = invoque ("Addition", "sub", args);
try{
ret = rep.getInt (0);
} catch (Exception e) {}
return ret;
}
public int add (int b, int a) {
JSONArray args = new JSONArray ();
int ret = 0;
args.put (b);
args.put (a);
JSONArray rep = invoque ("Addition", "add", args);
try{
ret = rep.getInt (0);
} catch (Exception e) {}
return ret;
}
}